﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HR_ctrQuestions.ascx.cs" Inherits="vHCS.Web.MdlHR.Controls.HR_ctrQuestions" %>
<%@ Register src="~/MdlHR/Controls/HR_ctrAnswers.ascx" tagname="HR_ctrAnswers" tagprefix="uc1" %>
<asp:HiddenField ID="hdfDataFieldParentID" runat="server" />
<asp:HiddenField ID="hdfDataFieldText" runat="server" />
<asp:HiddenField ID="hdfDataFieldValue" runat="server" />
<asp:HiddenField ID="hdfDataFieldSelectType" runat="server" />
<asp:HiddenField ID="hdfDataFieldInputType" runat="server" />
<asp:HiddenField ID="hdfDataFieldRequire" runat="server" />
<asp:HiddenField ID="hdfDataTextFieldTopic" runat="server" />
<asp:HiddenField ID="hdfDataFieldTopicId" runat="server" />
<asp:HiddenField ID="hdfValidationGroup" runat="server" />

<asp:Panel ID="pnlTableAnswer" runat="server" Visible="false" Width="100%">
        <table class="markList" cellpadding="0" cellspacing="0">
                <tr class="header">
                    <td> <asp:Label ID="Label1" runat="server" Text="Good"></asp:Label></td>
                    <td> <asp:Label ID="Label2" runat="server" Text="Fair"></asp:Label></td>
                    <td> <asp:Label ID="Label3" runat="server" Text="Average"></asp:Label></td>
                    <td> <asp:Label ID="Label4" runat="server" Text="Poor"></asp:Label></td>
                </tr>
                <tr>
                    <td><asp:Label ID="Label5" runat="server" Text="G"></asp:Label></td>
                    <td><asp:Label ID="Label6" runat="server" Text="F"></asp:Label></td>
                    <td><asp:Label ID="Label7" runat="server" Text="A"></asp:Label></td>
                    <td><asp:Label ID="Label8" runat="server" Text="P"></asp:Label></td>
                </tr>
        </table>
        <div class="divSepearator"></div>
        <asp:DataList ID="dtlTableAnswerList" DataKeyField="QuestionId" Width="100%"  OnItemDataBound="dtlTableAnswerList_ItemDataBound" CssClass="tableType" runat="server" Visible="true"> 
            <HeaderTemplate>           
                 <div class="headerRow" style=" padding-top:3px;"> 
                    <div class="divSepearator"></div>        
                    <div class="stt"><asp:Label ID="Label1" runat="server" Text="STT"></asp:Label></div>
                    <div class="factors"><asp:Label ID="Label9" runat="server" Text="Câu hỏi"></asp:Label></div>
                    <div class="marks"><asp:Label ID="Label10" runat="server" Text="Trả lời"></asp:Label></div>
                    <div class="comment"><asp:Label ID="Label11" runat="server" Text="Ghi chú"></asp:Label></div>
                    <div class="divClear"></div>
                </div> 
             </HeaderTemplate>
            <ItemTemplate>  
                <div class="itemRow">
                    <asp:TextBox  ID="hdfQuestionId" Visible="false" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"QuestionId") %>'></asp:TextBox>
                    <div class="stt"> <%#Container.ItemIndex + 1%></div>
                    <div class="factors">
                        <asp:Label ID="Label10" Visible='<%#DataBinder.Eval(Container.DataItem,"IsRequire") %>' runat="server" Text="(*)" CssClass="require"></asp:Label>
                        <%#DataBinder.Eval(Container.DataItem,"QuestionName") %>
                        <div>                      
                            <asp:RequiredFieldValidator ID="valRequireMarks" runat="server"  Visible="false"
                                SetFocusOnError="true" Display="Dynamic" CssClass="validation"  ControlToValidate="txtMarks"
                                ErrorMessage="Câu hỏi bắt buộc trả lời. Vui lòng nhập câu trả lời">
                            </asp:RequiredFieldValidator>
                         </div>
                    </div>
                    <div class="marks">
                        
                        <asp:TextBox ID="txtMarks" MaxLength="1"  
                            Text='<%#DataBinder.Eval(Container.DataItem,"Marks") %>'
                            style="text-transform:uppercase;" Width="90%" 
                            CssClass='inputText' runat="server"></asp:TextBox></div>
                    <div class="comment">
                        <asp:TextBox ID="txtComment" MaxLength="255" 
                            Text='<%#DataBinder.Eval(Container.DataItem,"Comment") %>'
                            Width="99%" CssClass='inputText' runat="server"></asp:TextBox>
                    </div>
                    <div class="divClear"></div> 
                </div>
            </ItemTemplate>   

        </asp:DataList>
        <div class="divSepearator"></div>
</asp:Panel>

<asp:DataList ID="dtlQuestions" OnItemDataBound="dtlQuestions_ItemDataBound" runat="server" Width="100%">
    <ItemTemplate>
        <asp:TextBox  ID="hdfQuestionId" Visible="false" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"QuestionId") %>'></asp:TextBox>
        <uc1:HR_ctrAnswers 
            DataTextField="AnswerName" 
            DataValueField="AnswerID"  
            runat="server" ID="ctrAnswer" >
        </uc1:HR_ctrAnswers>
    </ItemTemplate>
</asp:DataList>


